﻿// --------------------------------------------------------------------------------------------------------------------
// <copyright file="IView.cs" company="YellowFish">
//   Copyright © YellowFish 2009
// </copyright>
// <summary>
//   Defines the IView type.
// </summary>
// --------------------------------------------------------------------------------------------------------------------

namespace MobilePal.Views
{
  #region Imported Namespaces


  using System;
  using System.Collections.Generic;
  using System.Windows.Forms;

  using State;


  #endregion


  /// <summary>
  /// Defines a view interface.
  /// </summary>
  public interface IView
  {
    #region Events


    /// <summary>
    /// Occurs when an activity was selected.
    /// </summary>
    event EventHandler<ActivityEventArgs> ActivitySelected;


    #endregion


    #region Properties


    /// <summary>
    /// Gets the menu items.
    /// </summary>
    /// <value>The menu items.</value>
    List<MenuItem> MenuItems
    {
      get;
    }

    /// <summary>
    /// Gets the name.
    /// </summary>
    /// <value>
    /// The name.
    /// </value>
    string Name
    {
      get;
    }

    /// <summary>
    /// Gets the selected activity.
    /// </summary>
    /// <value>
    /// The selected activity.
    /// </value>
    Activity SelectedActivity
    {
      get;
    }


    #endregion


    #region Public Methods


    /// <summary>
    /// Gets the settings.
    /// </summary>
    /// <returns>
    /// </returns>
    ViewSettings GetSettings();


    /// <summary>
    /// Initializes the view with the specified activity collection and settings.
    /// </summary>
    /// <param name="activityCollection">The activity collection.</param>
    /// <param name="categoryCollection">The category collection.</param>
    /// <param name="settings">The settings.</param>
    void Initialize(ActivityCollection activityCollection, ActivityCategoryCollection categoryCollection, ViewSettings settings);


    /// <summary>
    /// Toggles the selected activity.
    /// </summary>
    void ToggleSelectedActivity();


    #endregion
  }
}